package gokyesil.game.aygitciklar.controller;

import gokyesil.game.aygitciklar.model.EndBox;

import com.badlogic.gdx.physics.box2d.Body;
import com.badlogic.gdx.physics.box2d.ContactFilter;
import com.badlogic.gdx.physics.box2d.Fixture;

public class Endrance implements ContactFilter {

	private Body eBoxBody;
	private Body aygitBody;
	public boolean isFinished;
	
	public Endrance(Body _aygitBody, Body eBoxBody2)
	{
		aygitBody = _aygitBody;
		eBoxBody = eBoxBody2;
		isFinished = false;
	}
	@Override
	public boolean shouldCollide(Fixture A, Fixture B) {
		if((A.getBody() == aygitBody && B.getBody() == eBoxBody) || (B.getBody() == aygitBody && A.getBody() == eBoxBody))
		{
			isFinished = true;
			return false;
		}
		else
		{
			return true;
		}
	}
}
